package com.example.shoppingmall.service;

import com.example.shoppingmall.pojo.Mold;
import com.example.shoppingmall.dao.MoldMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MoldService {
    @Autowired
    private MoldMapper moldMapper;

    public List<Mold> moldList(@Param("no")int no){
        return moldMapper.moldList(no);
    }

    public int count(){
        return moldMapper.count();
    }

    public int delete(@Param("id")int id){
        return moldMapper.delete(id);
    }

    public Mold xiangQing(@Param("id")int id){
        return moldMapper.xiangQing(id);
    }

    public int add(@Param("name")String name){
        return moldMapper.add(name);
    }

    public int chack(@Param("name")String name){
        return moldMapper.chack(name);
    }

    public int update(Mold mold){
        return moldMapper.update(mold);
    }

    public List<Mold>list(){
        return moldMapper.list();
    }
}
